<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<h:form>
	<h:panelGrid columns="5" style="margin-bottom:10px" cellpadding="5"
		columnClasses="label, value" id="panelCarreras">
		#{carreraBean.initialize}
		<h:outputText value="Mis Carreras" />
		<p:selectOneListbox id="misCarreras" value="#{carreraBean.mCarrera}">
			<f:selectItems value="#{carreraBean.misCarreras}" var="mCarrera"
				itemLabel="#{mCarrera.nombre}" itemValue="#{mCarrera}" />
		</p:selectOneListbox>

		<h:outputText value="Mi Nueva Carrera" />	
		<p:selectOneListbox id="allCarreras" value="#{carreraBean.nCarrera}">
			<f:selectItems value="#{carreraBean.allCarreras}" var="nCarrera"
				itemLabel="#{nCarrera.nombre}" itemValue="#{nCarrera}" />
		</p:selectOneListbox>
	</h:panelGrid>
	<p:commandButton value="Guardar Carrera" update="panelCarreras" id="guardar"  
             actionListener="#{carreraBean.nuevaCarrera}" styleClass="ui-priority-primary"/> 
</h:form>

</html>